package com.training.food.Mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.training.food.Domain.Confirmslauger;
import com.training.food.pojo.Initialpur;
import com.training.food.pojo.Slaughter;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface SlaughterMapper extends BaseMapper<Slaughter> {
    @Override
    int insert(Slaughter entity);
    void delete(Slaughter slaughter);
    Slaughter select(Slaughter slaughter);
    void update(Slaughter slaughter);
    List<Slaughter> thelist(List<Initialpur> initialpurs );
    List<Slaughter> selectByUser(@Param("username")String username, @Param("state")String state);
    List<Slaughter> selectAll(String state);
    Slaughter selectById(int id);

    //接收订单时对应批次的数量更新
    void updateConfirm(@Param("cs") List<Confirmslauger> cs);
    //ZZM获取状态为3的数量
    int get3num();
}
